home *** CD-ROM | disk | FTP | other *** search
/ How Many Bugs in a Box / How Many Bugs in a Box.cdr / bugs / act4 / 00084.ls < prev    next >
Encoding:
Text File  |  1995-04-05  |  1.5 KB  |  43 lines

  1. on mouseUp
  2.   global kingcolor, mycolor, colpal, level1, thissprite, cursorset, myclickon, canclicked, curdraw, curmask
  3.   set cursorset to 1
  4.   if (myclickon > 0) and (myclickon <> the clickOn) then
  5.     set rexi to the name of cast the castNum of sprite myclickon
  6.     set rexi to char 1 to the number of chars in rexi - 1 of rexi
  7.     set the castNum of sprite myclickon to the number of cast rexi
  8.     updateStage()
  9.   end if
  10.   set myclickon to the clickOn
  11.   set thissprite to the name of cast the castNum of sprite myclickon
  12.   if char the number of chars in thissprite of thissprite <> "i" then
  13.     set kingcolor to value(char 5 to the number of chars in thissprite of thissprite)
  14.     if not (the machineType = 256) then
  15.       colorcrsr(mGetSetCursor, 127 + kingcolor)
  16.     else
  17.       cursor([curdraw, curmask])
  18.     end if
  19.     if getAt(canclicked, kingcolor) = 0 then
  20.       setAt(canclicked, kingcolor, 1)
  21.       if level1 = 1 then
  22.         repeat with xxxx = 38 to 41
  23.           if not (myclickon = xxxx) then
  24.             puppetSprite(xxxx + 4, 1)
  25.             next repeat
  26.           end if
  27.           puppetSprite(xxxx + 4, 0)
  28.           set the visible of sprite (xxxx + 4) to 1
  29.         end repeat
  30.         play frame "bigcanname." & kingcolor
  31.         repeat with xxxx = 42 to 45
  32.           puppetSprite(xxxx, 0)
  33.         end repeat
  34.       else
  35.         play frame "smallcanname." & kingcolor
  36.       end if
  37.     end if
  38.     restorecans()
  39.     updateStage()
  40.     set the castNum of sprite myclickon to the number of cast (thissprite & "i")
  41.   end if
  42. end
  43.